<?php
	$obj=new Menu();
	$mod=new Module();
	$obj->loadByKey($id);
	
	include("FCKeditor/fckeditor.php");
	$listEmail=$obj->getListEmail();
?>
<form name="f" action="?module=<?php echo $module?>&action=process&mode=editcontact" method="post" enctype="multipart/form-data">
<div class="ContentTitle">
    <div class="left" style="padding-top:8px"><?php echo $objModule->ModuleName?></div>
    <div class="CMSButton right">
        <a onclick="f.submit()">Save</a>
        <a href="?module=<?php echo $module?>">Cancel</a>
    </div>    
    <div class="clear"></div>
</div>
<ul id="ContentTabs" class="shadetabs">
    <li><a id="linkTab1" onclick="ShowHideDiv('Tab',1,2,'link')" class="selected">Content</a></li>
    <li><a id="linkTab2" onclick="ShowHideDiv('Tab',2,2,'link')">Email list</a></li>
</ul>  

<div class="clear"></div>
<div id="Tab1" class="TabContainer ngt_Product" >
	<input type="hidden" name="MenuID" value="<?php echo $obj->MenuID?>"/>
    <table width="100%" border="1">
        <tr>
            <td width="10%">
                Menu Name:
            </td>
            <td>
                <?php echo $obj->MenuName?>
            </td>
        </tr>
        <tr> 
            <td colspan="2">
                <?php
                $oFCKeditor = new FCKeditor('MenuDetail');
                $oFCKeditor->BasePath = 'FCKeditor/';
                $oFCKeditor->Width  = '100%' ;
                $oFCKeditor->Height = '300' ;
                $oFCKeditor->Value = $obj->MenuDetail;
                $oFCKeditor->Create() ; 
                ?>
            </td>
        </tr>
    </table>
     
</div> 
<div class="clear"></div>
<div class="clear"></div>
<div id="Tab2" class="TabContainer ngt_Product" style="display:none" >
	<table width="100%" border="1">
        <tr>
			<td>
                Email 1:
            </td>
            <td>
                <input type="text" name="email[0]" value="<?php echo $listEmail[0]?>">
            </td>
        </tr>
		<tr>
			<td>
                Email 2:
            </td>
            <td>
                <input type="text" name="email[1]" value="<?php echo $listEmail[1]?>">
            </td>
        </tr>
		<tr>
			<td>
                Email 3:
            </td>
            <td>
                <input type="text" name="email[2]" value="<?php echo $listEmail[2]?>">
            </td>
        </tr>
    </table>
</div>    



<!-------------END CONTENT OF EACH MODULE ---------------------------->

</form>